package com.demo.page.feign.contact;

import com.demo.common.entity.BranchCompanyDTO;
import com.demo.page.feign.impl.news.NewsFeignImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 分公司
 * 作者：张兴然
 */
@FeignClient(name = "houpu-service-bean",fallback = NewsFeignImpl.class)
public interface BranchCompanyFeign {


    /**
     * 子公司分页数据
     * @param pageNum
     * @return
     */
    @GetMapping("branchCompany")
    List<BranchCompanyDTO> selectBranchCompany(@RequestParam(value = "pagenum", defaultValue = "1") Integer pageNum);

    /**
     * 子公司全部数据
     */
    @GetMapping("branchCompanyAll")
    List<BranchCompanyDTO> selectBranchCompanyAll();

    /**
     * 数据库下拉数据
     */
    @GetMapping("branchCompanyBySize")
    List<BranchCompanyDTO> selectBranchBySize(@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize);
}
